home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / examples / lexyacc / cl / error1.cl < prev    next >
Encoding:
Text File  |  1997-08-18  |  304 b   |  10 lines  |  [TEXT/R*ch]

  1. (* The infinite list of natural numbers --- with lexical error
  2.  
  3. letrec map = \f.\xs. case xs of
  4.                            <1>      -> pack{1};
  5.                            <2> x xr -> pack{2, f x, map f xr}
  6.                      end; 
  7.        add1 = \y.y+1; 
  8.        nats = pack{2, 0, map add1 nats}
  9. in nats
  10.